﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QLSV
{
    class DAL_Sinhvien
    {
        public DAL_Sinhvien()
        { }

        public void InsertSinhvien(int masv, string tensv, string malop, string diachi)
        {
            SqlConnection conn = new SqlConnection();
            conn.ConnectionString = @"Data Source=ADMIN-PC;Initial Catalog=qlsv; User Id=sa; Password=sa";
            conn.Open();
            SqlCommand cmd = new SqlCommand("insert into sinhvien values (" + masv.ToString() + ",'" + tensv + "','" + malop + "','" + diachi + "')", conn);
            cmd.ExecuteNonQuery();
            conn.Close();
        }
    }
}